package com.zxlspace.thread;

import java.util.*;

public class MapTest {
    public static void main(String[] args) {
       /* Map<String, String> hashtable = new Hashtable();

        hashtable.put("t1", "t1");
        hashtable.put("t2", "t2");
        hashtable.put("t3", "t3");

        Enumeration<Map.Entry<String, String>> iterator1 = (Enumeration<Map.Entry<String, String>>) hashtable.entrySet().iterator();
        hashtable.remove(iterator1.nextElement().getKey());
        while (iterator1.hasMoreElements()) {
            System.out.println(iterator1.nextElement());
        }

        Map<String, String> hashmap = new HashMap<>();
        hashmap.put("h1","1");
        hashmap.put("h2","2");
        hashmap.put("h3","3");

        Iterator<Map.Entry<String, String>> iterator2 = hashmap.entrySet().iterator();
        hashmap.remove(iterator2.next().getKey());
        while (iterator2.hasNext()) {
            System.out.println(iterator2.next());
        }*/

        Vector vector = new Vector();
        vector.add("11");
        vector.add("22");

        while (vector.iterator().hasNext()) {
            System.out.println(vector.elements().nextElement());
        }

        int[] array = new int[5];
        int[] array1 = new int[]{1, 2,3};

        List list = new ArrayList();
        Set<String> set = new HashSet<>();
        set.add("1");
        set.add("2");

        String str = new String();
        str.length();
    }
}
